package com.iotteam.androidbase.base;

import android.app.Application;
import android.content.Context;

import com.iotteam.androidbase.commen.network.core.HttpManager;

/**
 * Created by lidechen on 5/2/17.
 */

public class BaseApplication extends Application {

    private static String sCacheDir;
    public static Context sAppContext;

    /*static {
        AppCompatDelegate.setDefaultNightMode(
            AppCompatDelegate.MODE_NIGHT_NO);
    }*/

    @Override
    public void onCreate() {
        super.onCreate();
        sAppContext = getApplicationContext();

        HttpManager.getInstance().init();
    }

    private boolean ExistSDCard() {
        return android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);
    }

    public static Context getAppContext() {
        return sAppContext;
    }

    public static String getAppCacheDir() {
        return sCacheDir;
    }
}
